<template>
  <div class="card">
    <div class="content">
      <div class="title"> {{item.title}} </div>
      <div class="detail">
        <div class="article">
          {{item.content}}
        </div>
        <div v-show="item.thumb"  class="thumbnail">
            <img class="thumb" :src='"data:image/png;base64,"+item.thumb'/>
        </div>
      </div>

    </div>
  </div>
</template>

<style lang="less" scoped>

  .thumb{
    width: 24vh;
    height: 24vh;
  }

  @import url('../../style/test');

  @cardmargin: 0.675rem;
  @cardpadding: 4px;
  .card {
    text-align: left;
    border-radius: 5px;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2);
    margin: @cardmargin;
    height: 30vh;
    width: calc(~"100% - @{cardmargin}*2");
    background-color: white;
    opacity: 0.8;
    overflow: hidden;
  }

  .card:hover {
    transform: matrix(1, 0, 0, 1, 0, -3);
    box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.2);
    transition: 0.5s;
  }

  .content {
    padding: 8px;
    overflow: hidden;
  }

  .article {
    padding-right: 12px;
    word-wrap: break-word;
    max-width: 100%;
    width: calc(~"100% - 24vh");
    max-lines: 4;
  }

  .title {
    font-size: 2.0rem;
    font-weight: 700;
  }

  .detail {
    display: flex;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.5);
    text-wrap: normal;
  }

</style>


<script>
  export default{
    props: {
      item: Object
    }
  }
</script>
